<template>
	<view class="">
		<cc-locPicker leftTitle="收获地点" name="location" :value="mapSelData.poiname" placeholder="请选择位置"
			@click="chooseAddress"></cc-locPicker>
	</view>
</template>

<script>
	import ccLockPicker from '@/components/cc-locPicker/cc-locPicker.vue'
	// 获取地址工具
	import {
		getlocation
	} from '@/pagesB/h5map/utils.js'
	export default {
		data() {
			return {
				mapSelData: {
					"latlng": {}
				},
			}
		},
		components: {
			ccLockPicker
		},
		mounted() {
			// #ifdef H5
			let locations = getlocation() //获取位置信息
			if (locations) {
				this.mapSelData = locations
			
				uni.clearStorageSync();
			}
			// #endif
		},
		methods:{
			formSubmit: function(e) {
				console.log('form发生了submit事件，携带数据为：' + JSON.stringify(e));
				var formdata = e.detail.value;
				uni.showModal({
					title: '温馨提示',
					content: 'formsubmit事件携带数据为：' + JSON.stringify(e.detail.value)
				})
			
			},
			// 选择地址
			chooseAddress(e) {
				let myThis = this;
				uni.navigateTo({
					url: '../../pagesB/selectAddress/selectAddress'
				})
			
			
			},
		}
	}
</script>

<style>
</style>